package com.study.client;

import com.study.common.Result;
import com.study.entity.company.Department;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 声明接口,通过feign调用其他微服务
 *
 * @Author wfw
 * @Date 2020/07/12 17:55
 */
@FeignClient("hrm-company")
public interface CompanyFeignClient {
    @GetMapping("company/{id}")
    Result findCompanyById(@PathVariable(value = "id") String id);

    @GetMapping("company/department/search")
    Department findByCode(@RequestParam("code") String code, @RequestParam("companyId") String companyId);
}
